Lists as stacks

PUSH and POP permit a convenient syntax for the use of lists in implementing simple stacks. They are assignment forms, like SET and INCREMENT. See section [*] for a general discussion of assignment forms.

Special form


\begin{inset}{}
Cons a pair whose car is {\it object\/} and whose cdr is
the val...
...location\/} (LAMBDA (L) (CONS {\it object\/} L))) \\
\end{tabbing}}
\end{inset}

Special form


\begin{inset}{}
The car of the value in {\it location\/}
(this value should be a...
...(CAR {\it location\/}) (MODIFY {\it location\/} CDR))
\end{tabbing}}
\end{inset}